<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.json.JSONObject"%>
<%@page import="org.json.JSONArray"%>
<%@page import="cn.company.database.DBUtils"%>
<%@page import="cn.company.bean.SubSort"%>
<%@page import="java.util.List"%>
<%
	response.setCharacterEncoding("UTF-8");
	int sortid = Integer.parseInt(request.getParameter("data"));
	List<SubSort> subsorts = DBUtils.getSubSortsBySortId(sortid);
	JSONArray jsonSubsorts = new JSONArray();
	for(int i = 0;i < subsorts.size();i++){
		JSONObject subsort = new JSONObject();
		subsort.put("subsortid",subsorts.get(i).getId());
		subsort.put("subsortname",subsorts.get(i).getSubsortName());
		jsonSubsorts.put(subsort);
	}
	response.getWriter().print(jsonSubsorts.toString());
%>